/**
 * Created by JetBrains PhpStorm.
 * User: Silence
 * Date: 3/9/12
 * Time: 8:21 PM
 * To change this template use File | Settings | File Templates.
 */
Ext.define('EM.model.Folder', {
    extend:'Ext.data.Model',
    fields:[
        {
            name:'id',
            type:'string'
        },
        {
            name:'text',
            mapping:'name',
            type:'string'
        },
        {
            name:'leaf',
            type:'boolean',
            defaultValue:false

        },
        {
            name:'status',
            type:'int',
            defaultValue: 1
        },
        {
            name:'parentId',
            type:'string'
        },
        {
            name:'iconCls',
            type:'string',
            defaultValue:'x-tree-node-icon'
        },
        {
            name:'expanded',
            type:'boolean',
            defaultValue:false
        }
    ],
    hasMany:{model:'EM.model.Folder', name:'children'},
    belongsTo:'EM.model.Folder'

});